import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';

class LYSlidingController with ChangeNotifier {
  Offset _position = Offset.zero;
  Offset _startMoveOffset = Offset.zero;
  Offset _intersectionPoint = Offset.zero;
  bool slidingVisible = false;

  Offset get intersectionPoint {
    return _intersectionPoint;
  }

  set intersectionPoint(Offset intersectionPoint) {
    _intersectionPoint = intersectionPoint;
    if (slidingVisible) {
      notifyListeners();
    }
  }

  Offset get startMoveOffset {
    return _startMoveOffset;
  }

  set startMoveOffset(Offset startMoveOffset) {
    _startMoveOffset = startMoveOffset;
    notifyListeners();
  }

  Offset get position {
    return _position;
  }

  set position(Offset position) {
    _position = position;
    notifyListeners();
  }
}
